
#ifndef _LS_BLE_DIS_H_
#define _LS_BLE_DIS_H_

#include "stdint.h"

#ifdef __cplusplus
extern "C"
{
#endif

/*********************************************************************
    INCLUDES
*/

/*********************************************************************
    CONSTANTS
*/

// Device Information Service Parameters
/*#define DIS_IDX_SYSTEM_ID                 0
#define DIS_IDX_MODEL_NUMBER              1
#define DIS_IDX_SERIAL_NUMBER             2
#define DIS_IDX_FIRMWARE_REV              3
#define DIS_IDX_HARDWARE_REV              4
#define DIS_IDX_SOFTWARE_REV              5
#define DIS_IDX_MANUFACTURER_NAME         6
#define DIS_IDX_11073_CERT_DATA           7
#define DIS_IDX_PNP_ID                    8

// IEEE 11073 authoritative body values
#define DEVINFO_11073_BODY_EMPTY          0
#define DEVINFO_11073_BODY_IEEE           1
#define DEVINFO_11073_BODY_CONTINUA       2
#define DEVINFO_11073_BODY_EXP            254*/

// System ID length
#define DEVINFO_SYSTEM_ID_LEN             8

// PnP ID length
#define DEVINFO_PNP_ID_LEN                7

/*********************************************************************
    TYPEDEFS
*/
typedef enum {
    DIS_IDX_SYSTEM_ID = 0,
    DIS_IDX_MODEL_NUMBER,
//    DIS_IDX_SERIAL_NUMBER,
    DIS_IDX_FIRMWARE_REV,
    DIS_IDX_HARDWARE_REV,
    DIS_IDX_SOFTWARE_REV,
    DIS_IDX_MANUFACTURER_NAME,
//    DIS_IDX_11073_CERT_DATA,
//    DIS_IDX_PNP_ID,
} dev_info_idx_t;

/*********************************************************************
    MACROS
*/

/*********************************************************************
    Profile Callbacks
*/


/*********************************************************************
    API FUNCTIONS
*/

/*
    DevInfo_AddService- Initializes the Device Information service by registering
            GATT attributes with the GATT server.

*/

extern uint8_t dis_service_init( void );

/*********************************************************************
    @fn      dis_set_param

    @brief   Set a Device Information parameter.

    @param   param - Profile parameter ID
    @param   len - length of data to right
    @param   value - pointer to data to write.  This is dependent on
            the parameter ID and WILL be cast to the appropriate
            data type (example: data type of uint16 will be cast to
            uint16 pointer).

    @return  bStatus_t
*/
extern uint8_t dis_set_param(uint8_t param, uint8_t len, void* value);

/*
    dis_get_param - Get a Device Information parameter.

      param - Profile parameter ID
      value - pointer to data to write.  This is dependent on
            the parameter ID and WILL be cast to the appropriate
            data type (example: data type of uint16 will be cast to
            uint16 pointer).
*/
extern uint8_t dis_get_param(uint8_t param, void* value);

/*********************************************************************
*********************************************************************/

#ifdef __cplusplus
}
#endif

#endif /* _LS_BLE_DIS_H_ */
